package top.overstep.zboot.commons.enums;

/**
 * @author codeZzz
 * @date 2018-8-5
 * 全局状态码，请勿重复 按照每个模块增加100
 */
public enum CodeMessageEnum {
    /*-----公用code码------*/
    SUCCESS(10000,"操作成功"),
    FAIL(20000,"操作失败"),
    ERROR(30000,"系统异常"),

    /*-----入参合法性校验code码------*/
    PARAM_ERROR (20101,"参数不能为空"),


    /*-----登录注册code码------*/
    LOGIN_SUCCESS(10201,"登陆成功"),
    REGISTER_SUCCESS(10203,"注册成功"),
    LOGIN_FAIL(20201,"登陆失败"),
    REGIST_FAIL(20203,"注册失败"),
    ACCOUNT_LOCKED(20204,"账号被锁定"),

    ;
    private Integer code;
    private String message;

    CodeMessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
